<%--
  Created by IntelliJ IDEA.
  User: ghostxbh
  Date: 2020/7/24
  Time: 1:46 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<div id="header" xmlns="http://www.w3.org/1999/html">
    <div class="mfw-header">
        <div class="header-wrap clearfix" id="_j_head_nav_warper">
            <div class="head-logo">
                <a class="" href="${ctxFront}/home">
                    <img src="${ctxStatic}/common/images/logo.png" width="136" height="39">
                </a>
            </div>
            <ul class="head-nav" data-cs-t="headnav" id="_j_head_nav">
                <li class="head-nav-index _j_head_nav_index head-nav-active">
                    <a href="${ctxFront}/home">首页</a>
                </li>
                <c:forEach var="category" items="${categoryList}">
                    <li class="head-nav-gonglve _j_head_nav_gonglve">
                        <a href="${ctxFront}/search?category=${category.name}">${category.name}</a>
                    </li>
                </c:forEach>
            </ul>
            <div>
                <div class="login-out">
                    <c:choose>
                        <c:when test="${fns:getUser().name != null}">
                            <a href="${ctx}" rel="nofollow">${fns:getUser().name}</a>
                            <span class="split">|</span>
                            <a href="${ctx}/logout" rel="nofollow">注销</a>
                        </c:when>
                        <c:otherwise>
                            <a id="_j_showlogin" title="登录" href="${ctx}/login" rel="nofollow">登录</a>
                            <span class="split">|</span>
                            <a href="${ctx}/sys/register" title="注册帐号" rel="nofollow">注册</a>
                        </c:otherwise>
                    </c:choose>
                </div>
            </div>
        </div>
        <div class="shadow"></div>
    </div>

</div>
